#ifndef __RAWDATA__
#define __RAWDATA__ 1

#include "HeaderParameters.hh"
#include <string>
#include <fstream>
#include <iostream>
#include "TH1F.h"

using std::string;
using std::ifstream;
using std::cout;
using std::endl;
using std::cin;

class RawData {

public:
  
  RawData(string fname, HeaderParameters* h, int channels);
  ~RawData();

  TH1F** LoadNextWaveforms(float time_per_div);

  TH1F** GetCurrentWaveforms() { return waveforms; };
  int GetTracesRead() { return WaveformsRead; };
  void PlotWaveform();

private:
	int my_channels;
  string filename;
  int WaveformsRead;
  HeaderParameters* header;
  TH1F** waveforms;
  ifstream* datafile;

};



#endif
